package com.book.workbench.mapper;

import com.book.workbench.pojo.BorrowReturnCountP0;
import com.book.workbench.pojo.DateRequire;
import com.book.workbench.pojo.DateReturn;
import com.book.workbench.pojo.Information;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface InformationMapper {

    //添加借阅记录
    public Integer addInfo(Information information);

    //查找记录，根据条件
    public Information searchInfoBy(Information information);

    //修改借阅记录（还书）
    public Integer updateInfo(Information information);

    public List<DateReturn> searchInfoBy1(DateRequire dateRequire);

    public Integer searchCountInfoBy(DateRequire dateRequire);

    public Integer updateIslater(@Param("id") String id, @Param("due_date") String due_date);

    public List<BorrowReturnCountP0> getCountByTimeRange(@Param("date") String date, @Param("type") int type);//type:1借书、2还书

}
